﻿<%@ Page Title="" Language="C#" MasterPageFile="~/BackEnd/BackEndMasterPage.Master" AutoEventWireup="true"
    CodeBehind="ManageBooks.aspx.cs" Inherits="AteneoLibri.BackEnd.ManageBooks" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Gestione libri
    </h2>
    <p>
        Numero di libri inseriti
        <asp:Label ID="lblNumberOfBooks" runat="server"></asp:Label>
    </p>    
    <div style="padding-top: 20px;">
        <asp:GridView ID="gvBooks" runat="server" EmptyDataText="Non ci sono libri nel database" AllowPaging="true" OnPageIndexChanging="gvBooks_PageIndexChanging"
            AlternatingRowStyle-BackColor="#cccccc" BackColor="#ffffff" CellPadding="3" AutoGenerateColumns="false"
            ShowFooter="true" DataKeyNames="IdBook" PageSize="25" EmptyDataRowStyle-ForeColor="Red">
            <PagerStyle CssClass="cssPager" />
            <Columns>
                <asp:BoundField HeaderText="Titolo" ReadOnly="true" DataField="Title" />
                <asp:BoundField HeaderText="Autore" ReadOnly="true" DataField="Author" />                

                <asp:TemplateField HeaderText="Data Inserimento" SortExpression="InsertDate">
                    <ItemTemplate>
                        <asp:Label ID="lblInsertDate" runat="server" Text='<%# Eval("InsertDate", "{0:d}") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>                
            </Columns>
        </asp:GridView>
    </div>
</asp:Content>
